package ThreadArray;

import java.util.List;

/**
 * Created by wangyg 
 * on 2017/3/24 10:44
 */
public class Thread1 extends Thread {
	private List list;

	public Thread1(List list) {
		this.list = list;
	}

	@Override
	public void run() {
		for (int i = 0; i < 10000; i++) {
			this.list.add(i);
			System.out.println("线程1增加第" + i + "个元素");
//			try {
////				Thread.sleep(1);
//			} catch (InterruptedException e) {
//				e.printStackTrace();
//			}
		}

	}
}
